import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Vector;

public class AIMDump {
	
	public static void main(String[] args) throws IOException {
		
		try{
			Vector words = new Vector();
			
			if(args.length == 0)
				words = null;
			
			for(int i = 0; i < args.length; i++){
				words.add(args[i]);
			}
			
			IndexReader.readInIndex("AIM.out", words);
		}
		
		//Catch various exceptions thrown in other application classes.
		catch(FileNotFoundException fnfe)
		{
			System.err.println(fnfe.getMessage());
			System.exit(-1);
		}
		catch(IOException ioe)
		{
			System.err.println(ioe.getMessage());
			System.exit(-1);
		}
		//catch(Throwable t)
		//{
		//	System.err.println("ERROR: program terminated unexpectedly.");
		//	System.exit(-1);
		//}
	}

}
